home *** CD-ROM | disk | FTP | other *** search
-
-
-
- Tcl_InitHistory C Library Procedures Tcl_InitHistory
-
-
-
- _________________________________________________________________
-
- NNAAMMEE
- Tcl_InitHistory, Tcl_RecordAndEval - procedures for managing
- history list
-
- SSYYNNOOPPSSIISS
- ##iinncclluuddee <<ttccll..hh>>
-
- TTccll__IInniittHHiissttoorryy(_i_n_t_e_r_p) |
-
- int
- TTccll__RReeccoorrddAAnnddEEvvaall(_i_n_t_e_r_p, _c_m_d, _f_l_a_g_s)
-
- AARRGGUUMMEENNTTSS
- Tcl_Interp *_i_n_t_e_r_p (in) Tcl interpreter in which
- history facilities are
- being used.
-
- char *_c_m_d (in) Command (or sequence of
- commands) to execute.
-
- char _f_l_a_g_s (in) Flags to pass to TTccll__EEvvaall
- (normally 0). If -1, then
- the command is not exe-
- cuted; it's just
- recorded.
- _________________________________________________________________
-
-
- DDEESSCCRRIIPPTTIIOONN
- The procedure TTccll__HHiissttoorryyIInniitt is invoked to enable the his- |
- tory facilities in an interpreter (by default there is no |
- hhiissttoorryy command in an interpreter). After this command has |
- been executed the hhiissttoorryy command will be available in |
- _i_n_t_e_r_p and the history facilities will be initialized. |
- TTccll__HHiissttoorryyIInniitt is invoked automatically by |
- TTccll__RReeccoorrddAAnnddEEvvaall, so it need not be invoked explicitly |
- unless the hhiissttoorryy command is to be used before |
- TTccll__RReeccoorrddAAnnddEEvvaall has been called.
-
- TTccll__RReeccoorrddAAnnddEEvvaall is invoked to record a command on the his-
- tory list and then execute it. Programs that do not wish to
- use the history mechanism should not call TTccll__RReeccoorrddAAnnddEEvvaall;
- they should call TTccll__EEvvaall instead. Furthermore,
- TTccll__RReeccoorrddAAnnddEEvvaall should only be called with top-level com-
- mands typed by the user, since the purpose of history is to
- allow the user to re-issue recently-invoked commands.
-
- TTccll__RReeccoorrddAAnnddEEvvaall does three things. First, it calls
- TTccll__HHiissttoorryyIInniitt to initialize history for the interpreter
- _i_n_t_e_r_p, if this hasn't already been done. Second,
-
-
-
- Sprite v1.0 1
-
-
-
-
-
-
- Tcl_InitHistory C Library Procedures Tcl_InitHistory
-
-
-
- TTccll__RReeccoorrddAAnnddEEvvaall saves _c_o_m_m_a_n_d in the history list for
- _i_n_t_e_r_p, making a new event to hold the command. Third,
- TTccll__RReeccoorrddAAnnddEEvvaall executes the command by passing it and
- _f_l_a_g_s to TTccll__EEvvaall. If _f_l_a_g_s is -1 then only the first two
- steps are taken; the command will not be executed.
-
-
- KKEEYYWWOORRDDSS
- command, event, execute, history, interpreter, record
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Sprite v1.0 2
-
-
-
-